//
//  RDBaseMacros.h
//  ReverseDiabetes
//
//  Created by 王佩璇 on 2024/8/18.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface RDBaseMacros : NSObject

#pragma mark =============== 状态栏/导航栏... 高度 ===============
#define STATUS_BAR_HEIGHT [RDBaseMacros statusBarHeight]
#define STATUS_AND_NAVIGATION_HEIGHT STATUS_BAR_HEIGHT + 44

#pragma mark =============== 屏幕 rect ===============
#define SCREEN_RECT ([UIScreen mainScreen].bounds)
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#pragma mark =============== IsNil ===============
#define IsNilOrNull(_ref) (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]))
#define IsNullOrEmptyString(string) ((string) == nil || [(string) isEqualToString:@""] || [(string) isEqualToString:@"null"] || [(string) isEqualToString:@"(null)"])

#pragma mark =============== 获取图片资源 ===============
#define IMG(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
#define NULL_IMAGE [UIImage imageNamed:@""]
#define URL(url) [NSURL URLWithString:[NSString stringWithFormat:@"%@",url]]


#pragma mark =============== 字体大小 ===============
#define Font(a) [UIFont systemFontOfSize:a]
#define BoldFont(a) [UIFont boldSystemFontOfSize:a]

#define WEAKSELF __weak typeof(self)  weakSelf = self;





+ (CGFloat)statusBarHeight;

@end

NS_ASSUME_NONNULL_END
